<?php 
    namespace Application\Form;
    
    use Zend\Form\Fieldset;
    use Zend\InputFilter\InputFilterInterface;
    class UserSelectorFieldset extends Fieldset{
        public function __construct($name = null){
            parent::__construct('userSelector');
            $this->setHydrator(new\Zend\Stdlib\Hydrator\Reflection());
            $this->setObject(new \Application\Entity\User());
            $this->add(array(
                'name' => 'id',
                'type' => 'Zend\Form\Element\Select',
                'options' => array(
                    'label' => 'User : ',
                    'value_options' => array(
                        '1' => 'Label 1',
                        '2' => 'Label 2',
                    ),
                )
            ));
        }
    }
